package dao

import (
	"zg3/live/global"
	"zg3/live/internal/model"
)

// FindLiveName 查询直播间名称
func FindLiveName(name string) model.Live {
	var result model.Live
	if err := global.DB.Debug().Where("name = ?", name).Limit(1).Find(&result).Error; err != nil {
		return model.Live{}
	}
	return result
}
